<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
    </head>
    <body>
        <script>
            // Number.EPSILON 是js中的最小精度

            const equal = (a,b)=>{
                if(Math.abs(a-b)<Number.EPSILON){
                    return true;
                }else{
                    return false;
                };
            };
            console.log(equal(0.01+0.03,0.04));
        </script>
    </body>
</html>